package com.outsource.framework.model.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.outsource.framework.domain.Tactivity;

public interface TactivityRepository extends JpaRepository<Tactivity, Integer>, JpaSpecificationExecutor<Tactivity>{

	@Query(value="select * from t_activity where level = 1 and status = :status ",nativeQuery = true)
	List<Tactivity> getByJTAll(@Param("status")String status);
	@Query(value="select * from t_activity where scope in (?1) and status = ?2 and level in(2,3) order by scope desc",nativeQuery = true)
	List<Tactivity> getByPCAll(List<String> scope,String status);
	
}
